//
//  WmcMoreRightAlertCell.swift
//  YPWatermarkCamera
//
//  Created by 马涛 on 2022/7/7.
//

import Foundation
import UIKit
import YPBedrock

class WmcHomeMoreRightsAlertCell: WmcBaseCollectionCell {
    /// 图片
    lazy var imgView: UIImageView = {
        let view = UIImageView()
        return view
    }()

    /// 标题
    lazy var titleLabell: UILabel = {
        let view = UILabel()
        view.textColor = UIColor.wmc_grayH2_323233
        view.font = 15.yp.uiFont(weight: .medium)
        view.textAlignment = .center
        return view
    }()

    /// 副标题
    lazy var subTitleLabel: UILabel = {
        let view = UILabel()
        view.textColor = UIColor.wmc_grayH8_8A8A99
        view.font = 13.yp.uiFont(weight: .regular)
        view.textAlignment = .center
        return view
    }()

    func configure(model: WmcHomeMoreRightsAlert.Model) {
        imgView.image = model.img.wmc_image
        titleLabell.text = model.title
        subTitleLabel.text = model.subTitle
    }

    override func makeUI() {
        contentView.addSubview(imgView)
        contentView.addSubview(titleLabell)
        contentView.addSubview(subTitleLabel)

        imgView.snp.makeConstraints { make in
            make.top.equalToSuperview()
            make.centerX.equalToSuperview()
            make.width.height.equalTo(40)
        }
        titleLabell.snp.makeConstraints { make in
            make.top.equalTo(imgView.snp.bottom).offset(13)
            make.left.right.equalToSuperview()
        }
        subTitleLabel.snp.makeConstraints { make in
            make.top.equalTo(titleLabell.snp.bottom).offset(2)
            make.left.right.equalToSuperview()
            make.bottom.equalToSuperview()
        }
    }
}
